using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Diagnostics;
using SQLDeployActions;

namespace SQLDeploy
{
    class Program
    {

        static void Main(string[] args)
        {
            try
            {

                Console.WriteLine(" ");
                Console.WriteLine("Starting Database Deployment.....");
                Console.WriteLine("Running Pre-Deployment tasks...");
                DeployVerification.PreDeployVerification(args);
                Console.WriteLine("Executing SQL scripts....");
                DeployActions.CreateSQLRunBatch();
                Console.WriteLine("Database deployment complete");

            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                if (ex.InnerException != null)
                    Console.WriteLine(ex.InnerException.Message);
            }
#if DEBUG
            Console.ReadKey(true);
#endif
        }

    }
}
